# Maintainer: David Runge <dvzrv@archlinux.org>

_name=BSlizr
pkgname=bslizr
pkgver=1.2.16
pkgrel=2
pkgdesc="LV2 audio effect plugin for sequenced slicing of stereo audio input signals"
arch=(loong64 x86_64)
url="https://github.com/sjaehn/bslizr"
license=(GPL3)
groups=(
  lv2-plugins
  pro-audio
)
depends=(
  cairo
  gcc-libs
  glibc
  libx11
  lv2-host
)
makedepends=(lv2)
checkdepends=(lv2lint)
source=($url/archive/$pkgver/$_name-$pkgver.tar.gz)
sha512sums=('886618221d848bcb8a26598022465161913d578e32c5430d5e8a3aba41fb0ee374de7bb1867854d1a4ea45f2de0717867732f4ee39ff4164ba28de74280d1d46')
b2sums=('c3efa7550ff95935faa014932afc8f50761d3860788bd7696781cdb99f06e6e6bae584dc59706150818f11407439ca1558ffb647bb53ad17eb845d7ab95acfb2')

build() {
  make PREFIX=/usr -C $_name-$pkgver
}

check() {
  lv2lint -Mpack -t "UI Symbols" -I $_name-$pkgver/$_name.lv2/ "https://www.jahnichen.de/plugins/lv2/BSlizr"
}

package() {
  make DESTDIR="$pkgdir" PREFIX=/usr install -C $_name-$pkgver
  install -vDm 644 $_name-$pkgver/README.md -t "$pkgdir/usr/share/doc/$pkgname/"
  # remove useless license file
  find "$pkgdir/usr/lib/" -type f -iname "*LICENSE*" -delete
}
